<template>
	<view class="index" :style="{paddingTop: `${statusBarHeight}px`}">
		<uni-nav-bar backgroundColor="transparent" :border="false" />
		<image class="BG" :src="bgUrl" mode=""></image>
		<view class="logo">
			<image src="@/static/logo.png" alt="" />
		</view>
		<view class="info-text" style="color: #fff;">
			<image src="../../static/info-text.png" mode=""></image>
		</view>
		<view class="login" @click="goForm">注册会议</view>
	</view>
</template>

<script>
	import uniNavBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"
	import {
		HTTP_REQUEST_URL
	} from '@/config/app';
	import {
		user_info
	} from "@/api/user";
	export default {
		components: {
			uniNavBar
		},
		data() {
			return {
				statusBarHeight: 44,
				code: '',
				locale: this.$i18n.locale,
				bgUrl: `${HTTP_REQUEST_URL}/static/BG.gif`
			}
		},
		onLoad() {
			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			goForm() {
				uni.navigateTo({
					url: '/pages/form/index'
				})
			},
			goBack() {
				uni.navigateBack()
			},
			changeLanguage() {
				if (this.$i18n.locale == 'zh') {
					this.$i18n.locale = 'en';
					uni.setStorageSync('locale', 'en')
				} else {
					this.$i18n.locale = 'zh';
					uni.setStorageSync('locale', 'zh')
				}
			}
		}
	}
</script>

<style lang="scss">
	.index {
		position: relative;
		height: 100%;
		min-height: 100vh;
		background-color: #050033;
		
		padding-bottom: 180upx;
		box-sizing: border-box;

		.logo {
			width: 78upx;
			height: 64upx;
			padding-top: 18upx;
			margin-left: 30px;
			position: relative;
			z-index: 1000;
			
			image {
				width: 100%;
				height: 100%;
			}
		}

		.BG {
			position: absolute;
			top: 0;
			right: 0;
			width: 750upx;
			height: 1231upx;
			z-index: 1;
		}
		
		.info-text {
			width: 690upx;
			height: 421upx;
			padding-top: 654upx;
			margin: 0 auto;
			position: relative;
			z-index: 1000;
			
			image {
				width: 100%;
				height: 100%;
			}
		}
		
		.login {
			width: 362upx;
			height: 90upx;
			line-height: 90upx;
			text-align: center;
			margin: 112upx auto 0;
			color: #fff;
			font-size: 30upx;
			background-color: #d3a86a;
			border-radius: 10upx;
			position: relative;
			z-index: 10000;
		}
	}
</style>